from django.contrib import admin

from . import models as app_models


class OpLogAdmin(admin.ModelAdmin):
    list_display = (
        'id',
        'object_id',
        'object_type',
        'operator_time',
        'log_type',
        'user_id',
        'operator',
        'log',
    )
    list_filter = (
        'object_type',
        'log_type',
        'operator_time',
    )
    search_fields = (
        'operator',
        'object_id',
    )


admin.site.register(app_models.OpLog, OpLogAdmin)
